// 创建store,需要的工具
import { legacy_createStore as createStore, combineReducers, applyMiddleware } from 'redux'
// thunk 中间件
import thunk from 'redux-thunk'
// 数据查看插件
import { composeWithDevTools } from 'redux-devtools-extension'

// 导入模块（业务）reducer
import { login } from './reducers/login'
// rootReducer
const rootReducer = combineReducers({ login })

// 导出创建的store
export const store = createStore(rootReducer, composeWithDevTools(applyMiddleware(thunk)))
